package chap5.Task;
public class Task11 {
    public static void main(String[] args) {
        int i, j;
        int[] a = {2, 3, 5, 8, 9, 6, 7, 10, 11, 11, 12};
        boolean k = true;
        for (i = 0; i < a.length && k; i++) {
            for (j = i + 1; j < a.length; j++) {
                if (a[i] == a[j]) {
                    k = false;
                    break;
                }
            }
        }
        if (k) {
            System.out.println("数组a无重复数据");
        } else {
            System.out.println("数组a有重复数据");
        }
    }
}
